package knowse.app.presentation;

import java.util.ArrayList;

import knowse.app.R;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ProjectListActivity extends ListActivity{
	
	ArrayList<String> projectList;
	
	//oncreate
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.projectlistactivity);

		projectList = new ArrayList<String>();
		populateProjectList();
		ArrayAdapter<String> adapter = 
				new ArrayAdapter<String>(this,
										 android.R.layout.simple_list_item_1,
										 projectList);
		setListAdapter(adapter);
	}
	
	protected void onListItemClick(ListView l, View v, int position, long id) {
		
		Intent intent = new Intent();
		intent.setClass(ProjectListActivity.this, TestListActivity.class);
		ProjectListActivity.this.startActivity(intent);
		
	}
	
	private void populateProjectList(){
		projectList.add("KnowSE");
	}
	
	
	
	
}

